﻿@model ShivamEMR.Model.Domain.ContactsDomain.Address

 
 <script src="@Url.Content("~/Content/jquery.metro.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Ajax.BeginForm("NewAddress", "Patient", null,
        new AjaxOptions
        {
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "POST",
            OnSuccess = "AddressSuccess"
        }, new { @id = "updateAddressForm" }))
{
    @Html.ValidationSummary(true)
<div class='metro-pivot'>
<div class='pivot-item'>
     
        <table width="100%" cellpadding="4" cellspacing="4">
		<tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Address1)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Address1)
            @Html.ValidationMessageFor(model => model.Address1)
        </div>
</td>
  
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Address2)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Address2)
            @Html.ValidationMessageFor(model => model.Address2)
        </div>
</td>
</tr><tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Landmark)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Landmark)
            @Html.ValidationMessageFor(model => model.Landmark)
        </div>
</td>
   

<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.City)
        </div>
</td>
<td>

        <div class="editor-field">
              @Html.DropDownListFor(model => model.CityID, ((IEnumerable<ShivamEMR.Model.Domain.ContactsDomain.City>)ViewBag.PassibleCities).Select(option => new SelectListItem
         {
             Text = (option == null ? "None" : option.CityName),
             Value = option.ID.ToString(),
             Selected = (Model != null) && (option.ID == Model.CityID)
         }), "Choose...")
                            @Html.ValidationMessageFor(model => model.CityID) 
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Territory)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.DropDownListFor(model => model.TerritoryID, ((IEnumerable<ShivamEMR.Model.Domain.ContactsDomain.Territory>)ViewBag.PassibleTerritories).Select(option => new SelectListItem
       {
           Text = (option == null ? "None" : option.TerritoryName),
           Value = option.ID.ToString(),
           Selected = (Model != null) && (option.ID == Model.TerritoryID)
       }), "Choose...")
                            @Html.ValidationMessageFor(model => model.TerritoryID) 
        </div>
</td>

 
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Country)
        </div>
</td>
<td>

        <div class="editor-field">
          @Html.DropDownListFor(model => model.CountryID, ((IEnumerable<ShivamEMR.Model.Domain.ContactsDomain.Country>)ViewBag.PassibleCountries).Select(option => new SelectListItem
                       {
                           Text = (option == null ? "None" : option.FullName),
                           Value = option.ID.ToString(),
                           Selected = (Model != null) && (option.ID == Model.CountryID)
                       }), "Choose...")
                            @Html.ValidationMessageFor(model => model.CountryID) 
           
        </div>
</td>
    </tr>

    <tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.ZipCode)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.ZipCode)
            @Html.ValidationMessageFor(model => model.ZipCode)
        </div>
</td>
 
    <td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AddressType)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.DropDownListFor(model => model.AddressTypeID, ((IEnumerable<ShivamEMR.Model.Domain.ContactsDomain.AddressType>)ViewBag.PossibleAddressTypes).Select(option => new SelectListItem
       {
           Text = (option == null ? "None" : option.Type),
           Value = option.ID.ToString(),
           Selected = (Model != null) && (option.ID == Model.AddressTypeID)
       }), "Choose...")
                            @Html.ValidationMessageFor(model => model.AddressTypeID) 
        </div>
</td>
    </tr>



<tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Notes)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Notes)
            @Html.ValidationMessageFor(model => model.Notes)
        </div>
</td>
    </tr> <tr>
	     </tr></table>
         </div>     
   </div>
       
    
}

 
<script>
    $(function () {
        $("div.metro-pivot").metroPivot();
    });
</script>

